import os
from openai import OpenAI
# from openai import OpenAI
# from langchain_openai import OpenAI
#
# # gpt-3.5-turbo
# os.environ['OPENAI_API_KEY'] = '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'
llm = OpenAI(api_key='hk-mtiquv1000041663a49a34520ad3294132cbce7abf1c2ef3',
    base_url="https://api.openai-hk.com/v1")

# def getOpenAI():
#     client = OpenAI(
#         base_url='http://localhost:11434/v1',
#         api_key='EMPTY',  # required, but unused
#     )
#     return client

# model = getOpenAI()
# response = model.chat.completions.create(
#     model="qwen:1.8b",
#     messages=[
#         {"role": "system", "content": "You are a helpful assistant."},
#         {"role": "user", "content": "Who was the first person to step on the moon?"},
#         {"role": "assistant",
#          "content": "Neil Armstrong was the first person to step on the moon on July 20, 1969, during the Apollo 11 mission."},
#         {"role": "user", "content": "What were his first words when he stepped on the moon?"}
#     ]
# )
# print(response.choices[0].message.content)
